package com.qingpeng.pay.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.qingpeng.pay.R;
import com.qingpeng.pay.beans.QRCodeListBean;
import com.qingpeng.pay.beans.WithdrawBean;

public class QRCodelistAdapter extends BaseQuickAdapter<QRCodeListBean.DataProductBean.PaofenProductBean, BaseViewHolder> {


    public QRCodelistAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, QRCodeListBean.DataProductBean.PaofenProductBean item) {
        if (item.getScore()+"".indexOf("-")!=-1){
            helper.setText(R.id.money, item.getScore() + "元")
                    .setText(R.id.time, item.getCreatime())
                    .setText(R.id.status,item.getRemark());
        }else{
            helper.setText(R.id.money, item.getScore() + "元")
                    .setText(R.id.time, item.getCreatime())
                    .setText(R.id.status,"分配额度");
        }
    }
}
